<template>
  <el-dialog
    v-model="searchFormDialogVisible"
    width="35%"
    :close-on-click-modal="false"
  >
    <slot name="searchDialogSlot"></slot>
    <template #footer>
      <div class="dialog-footer">
        <div style="float: left">
          <el-button
            type="primary"
            @click="
              search();
              changeSearchFormDialogVisible();
            "
            >确认搜索
          </el-button>
        </div>
        <el-button @click="changeSearchFormDialogVisible()">取消 </el-button>
      </div>
    </template>
  </el-dialog>
</template>

<script lang="ts" setup>
import { inject } from "vue";

const props = inject("props");

const searchFormDialogVisible = inject("searchFormDialogVisible");

const changeSearchFormDialogVisible = inject(
  "changeSearchFormDialogVisible"
) as () => void;

const search = inject("search") as () => void;
</script>

<style scoped></style>
